class Innate_Skill
  attr_reader   :actor
  attr_reader   :type # 1=normal skill 2=special skill 3=passive 4=limit skill
  attr_reader   :name
  attr_accessor   :level
  attr_accessor   :name
  attr_accessor   :icon_name
  attr_accessor   :description
  attr_accessor   :selected_target
  attr_accessor   :energy_cost
  attr_accessor   :target_mode #0=self 1=single enemy 2=all enemy 3=single friend 4=all all friend
  attr_accessor   :help_value
  def initialize(actor)
    @actor = actor
    @energy_cost = 0
    @level = 1
    @icon_name = "044-Skill01"
    @target_mode = 0
    @help_value = 0
  end
  def use_check?
    case @type
    when 1
      return true
    when 2
      return $game_party.battle_energy >= @energy_cost
    when 3
      return false
    when 4
      return @actor.sp == 100
    end
    return false
  end
  def use
    $game_party.change_energy(-@energy_cost)
    case @type
    when 1
      @actor.sp += 10
    when 2
      @actor.sp += 20
    when 4
      @actor.sp = 0
    end
  end
  def on_battle_start
  end
  def make_target(target)
    @selected_target = target
  end
  def make_actions
  end
  def on_take_damge(damge_info)
  end
  def make_single_attack_action(self_anim, attack_anim, target, damge_info)
    actions = []
    action = Action_Bit.new(@actor, 1)
    action.set_detail(self_anim).set_block
    actions.push(action)
    if attack_anim != 0
      action = Action_Bit.new(target, 1)
      action.set_detail(attack_anim).set_block
      actions.push(action)
    end
    damage_action = Action_Bit.new(target, 2)
    damage_action.set_detail(damge_info)
    actions.push(damage_action)
    return actions
  end
  def make_damge_info(value)
    critcal = rand(100) < @actor.str
    if critcal
      value = (value * (@actor.agi) / 100.0).round
    end
    damge_info = Damge_Info.new(@actor, value, 4, critcal)
    return damge_info
  end
  def action_flow
    return $game_temp.current_battle.flow
  end
  def next_level_description
    return "下一级："
  end
end
